-
Notifications
You must be signed in to change notification settings - Fork 799
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update @wordpress/eslint-plugin
#39305
Conversation
This brings two new rules that needed fixing: * `@wordpress/i18n-no-flanking-whitespace` complains about leading or trailing whitespace in JS i18n messages. Fix depends on context: * Sometimes it makes no difference, the browser (or React) strips it out. Removed these. * Sometimes it does, or it's unclear. In these cases I added it back outside the i18n call. * `@wordpress/i18n-hyphenated-range` wants en-dashes (or em-dashes) for numeric ranges. Switched them to en-dashes.
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available. Follow this PR Review Process:
Still unsure? Reach out in #jetpack-developers for guidance! Jetpack plugin: The Jetpack plugin has different release cadences depending on the platform:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. Protect plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. Super Cache plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. Migration plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have some questions about preserving spaces here, maybe we should test these to make sure.
'jetpack-search-pkg' | ||
) } | ||
</span> | ||
</span>{ ' ' } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we put the space inside the span
element to preserve the original behavior?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤷 No idea. In practice CSS currently sets display: block
on these spans so the whitespace gets ignored either way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -70,7 +70,7 @@ const ShareDebugData = () => { | |||
|
|||
return ( | |||
<div className={ styles[ 'share-data-section' ] }> | |||
<Title mb={ 2 }>{ __( ' Share detailed data with Jetpack', 'jetpack-protect' ) }</Title> | |||
<Title mb={ 2 }>{ __( 'Share detailed data with Jetpack', 'jetpack-protect' ) }</Title> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you been able to figure out why there was a space here in the first place? Maybe we should preserve this one too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to go back to 021eb6a, beyond that I have no idea.
It made no difference to the rendering when I tried it. HTML ignores whitespace at the start of block elements like the <h2>
generated here.
@@ -33,7 +33,7 @@ const ProductPromotion = () => { | |||
<Title>{ __( 'Get access to our Cloud', 'jetpack-protect' ) }</Title> | |||
<Text mb={ 3 }> | |||
{ __( | |||
'With your Protect upgrade, you have free access to scan your site on our Cloud, so you can be aware and fix your threats even if your site goes down. ', | |||
'With your Protect upgrade, you have free access to scan your site on our Cloud, so you can be aware and fix your threats even if your site goes down.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm afraid we'll have to preserve this too for inline elements.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for doing the legwork and actually testing the changes!
Proposed changes:
This brings two new rules that needed fixing:
@wordpress/i18n-no-flanking-whitespace
complains about leading or trailing whitespace in JS i18n messages. Fix depends on context:@wordpress/i18n-hyphenated-range
wants en-dashes (or em-dashes) for numeric ranges. Switched them to en-dashes.Other information:
Jetpack product discussion
None
Does this pull request change what data or activity we track or use?
No
Testing instructions: